<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>layui_test</title>
</head>
<body>
<div id="div"><ul>
    <li>
        adfdsfasdfasdfasddfasdfasdfasdfasdfasdfasdffasdfasdfasbcd
    </li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
    <li>abcd</li>
</ul></div>
<button id="id">点击</button>
</body>
</html>
<script src="js/jquery.min.js"></script>
<script src="layer/layer/layer.js"></script>
<script>
    $('#id').on('click', function(){
        var that = this;
        layer.open({
            type:2,
            content:/*$('#div')*/ 'test2.html', //
            area: ['100%','100%'],
        })//在元素的事件回调体中，follow直接赋予this即可
    });

</script>